//
//  GMAuthTextField.m
//  GuardMan
//
//  Created by steven on 2016/12/25.
//  Copyright © 2016年 steven. All rights reserved.
//

#import "GMAuthTextField.h"

@implementation GMAuthTextField

- (id)init {
    self = [super init];
    if (self) {
        self.borderStyle = UITextBorderStyleRoundedRect;
        self.leftViewMode = UITextFieldViewModeAlways;
        self.font = [UIFont systemFontOfSize:AUTH_FONT_SIZE];
        self.layer.borderColor = BUTTON_ACTIVE_COLOR.CGColor;
        self.layer.borderWidth = 1;
        self.layer.cornerRadius = 8;
    }
    
    return self;
}

// Adjust leftview padding
-(CGRect) leftViewRectForBounds:(CGRect)bounds {
    CGRect iconRect = [super leftViewRectForBounds:bounds];
    iconRect.origin.x += 10;// 右偏10
    return iconRect;
}

@end
